//-----------------------------------------------------------------------------
// Name: Bullet.h
// Auth: Dante Ratto, Robert Darty, & Paul Godfrey
// Desc: Handles the creation, destruction and updating of a bullet
//-----------------------------------------------------------------------------

#ifndef _BULLET_
#define _BULLET_

#include "SharedConstants.h"
#include "Bounding.h"

//-----------------------------------------------------------------------------
// cBullet:
//-----------------------------------------------------------------------------
class cBullet
{
public:
	// Constructors:
	cBullet();
	cBullet(float, float, float, float, float, int, float);
	~cBullet();

	// cBullet Methods:
	
	//-----------------------------------------------------------------------------
	void Update(float elapsedTimeS);
	// Desc: Updates bullet location

	//-----------------------------------------------------------------------------
	void Draw();
	// Desc: draws bullet sphere

	//-----------------------------------------------------------------------------
	void SetPosition(float, float, float);
	// Desc: Sets bullet position

	//-----------------------------------------------------------------------------
	void SetFired(bool);
	// Desc: Sets fired status

	//-----------------------------------------------------------------------------
	bool GetFired();
	// Desc: Gets fired status

	//-----------------------------------------------------------------------------
	void SetYaw(float);
	// Desc: Sets angle

	//-----------------------------------------------------------------------------
	void SetPitch(float);
	// Desc: Sets pitch

	//-----------------------------------------------------------------------------
	void SetStatus(bool);
	// Desc: Sets status of bullet

	//-----------------------------------------------------------------------------
	float GetPositionX();
	// Desc: Gets bullet X
	
	//-----------------------------------------------------------------------------
	float GetPositionY();
	// Desc: Gets bullet Y
	
	//-----------------------------------------------------------------------------
	float GetPositionZ();
	// Desc: Gets bullet Z
	
	//-----------------------------------------------------------------------------
	float GetYaw();
	// Desc: Get Yaw
	
	//-----------------------------------------------------------------------------
	float GetPitch();
	// Desc: Get Pitch
	
	//-----------------------------------------------------------------------------
	float GetDist();
	// Desc: Get Bullet distance
	
	//-----------------------------------------------------------------------------
	int GetDamage();
	// Desc: Get bullet damage value
	
	//-----------------------------------------------------------------------------
	float GetLifeSpan();
	// Desc: Get bullet lifespan

	//-----------------------------------------------------------------------------
	cBounding* GetBounding();

	// Members:
	int mNum;

private:
	tVector3f mPosition;
	tVector3f mVelocity;
	tVector3f mDistance;

	int mDamage;
	int mSpeed;

	float mYaw;
	float mPitch;
	float distance;
	float mLifeSpan; //Distance in meters

	bool mStatus;

	cBounding mBounding;
};

//-----------------------------------------------------------------------------
// Functions:
//-----------------------------------------------------------------------------
cBullet* GetBullet();

#endif